﻿// Type: System.Resources.ResXResourceWriter
// Assembly: System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
// Assembly location: C:\Windows\Microsoft.NET\Framework\v4.0.30319\System.Windows.Forms.dll

using System;
using System.IO;
using System.Reflection;
using System.Runtime;
using System.Security.Permissions;

namespace System.Resources
{
    [PermissionSet(SecurityAction.InheritanceDemand, Name = "FullTrust")]
    [PermissionSet(SecurityAction.LinkDemand, Name = "FullTrust")]
    public class ResXResourceWriter : IResourceWriter, IDisposable
    {
        public static readonly string BinSerializedObjectMimeType;
        public static readonly string SoapSerializedObjectMimeType;
        public static readonly string DefaultSerializedObjectMimeType;
        public static readonly string ByteArraySerializedObjectMimeType;
        public static readonly string ResMimeType;
        public static readonly string Version;
        public static readonly string ResourceSchema;
        public ResXResourceWriter(string fileName);
        public ResXResourceWriter(string fileName, Func<Type, string> typeNameConverter);
        public ResXResourceWriter(Stream stream);
        public ResXResourceWriter(Stream stream, Func<Type, string> typeNameConverter);
        public ResXResourceWriter(TextWriter textWriter);
        public ResXResourceWriter(TextWriter textWriter, Func<Type, string> typeNameConverter);

        public string BasePath { [TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]
        get; [TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]
        set; }

        #region IResourceWriter Members

        [TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]
        public void AddResource(string name, byte[] value);

        public void AddResource(string name, object value);

        [TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]
        public void AddResource(string name, string value);

        [TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]
        public void Close();

        public virtual void Dispose();
        public void Generate();

        #endregion

        ~ResXResourceWriter();
        public virtual void AddAlias(string aliasName, AssemblyName assemblyName);

        [TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]
        public void AddMetadata(string name, byte[] value);

        [TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]
        public void AddMetadata(string name, string value);

        [TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]
        public void AddMetadata(string name, object value);

        public void AddResource(ResXDataNode node);

        protected virtual void Dispose(bool disposing);
    }
}
